<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: cordic/cordic.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_a674585e0fd636fbc3b91e5f7b647f01.html">cordic</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">cordic.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC against math library Add Documentation and references.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="cordic2c__inc_8h_source.html">cordic2c_inc.h</a>&quot;</code><br />
</div>
<p><a href="cordic_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpoint.html">point</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Point definition.  <a href="structpoint.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0de74b8b36857d95aadfc48438b64259"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a0de74b8b36857d95aadfc48438b64259">deg2rad</a> (double deg)</td></tr>
<tr class="memdesc:a0de74b8b36857d95aadfc48438b64259"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert Degrees to Rads.  <a href="#a0de74b8b36857d95aadfc48438b64259">More...</a><br /></td></tr>
<tr class="separator:a0de74b8b36857d95aadfc48438b64259"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a132f4d86aeaa02138e534f93cbf69757"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a132f4d86aeaa02138e534f93cbf69757">angle_quad</a> (double quads, int *quad)</td></tr>
<tr class="memdesc:a132f4d86aeaa02138e534f93cbf69757"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute quadrant of angle and the quadrant modulus Note: Integer part is quadrant.  <a href="#a132f4d86aeaa02138e534f93cbf69757">More...</a><br /></td></tr>
<tr class="separator:a132f4d86aeaa02138e534f93cbf69757"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e686d8e990a05ea18655a368e6d1918"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a9e686d8e990a05ea18655a368e6d1918">Circular</a> (<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#a12ad102c2d1e7e119fdc040b0c922c7e">x</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#afe490938209e0b6b15224c05a01f0b40">y</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> z)</td></tr>
<tr class="memdesc:a9e686d8e990a05ea18655a368e6d1918"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main Cordic routine - used for basic trig and vector rotations.  <a href="#a9e686d8e990a05ea18655a368e6d1918">More...</a><br /></td></tr>
<tr class="separator:a9e686d8e990a05ea18655a368e6d1918"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9bc8a20d99938e647047015d62f6f86"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#ab9bc8a20d99938e647047015d62f6f86">cordic_quad</a> (double angle, double *s, double *c)</td></tr>
<tr class="memdesc:ab9bc8a20d99938e647047015d62f6f86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Sin and Cos from angle in quads using Cordic.  <a href="#ab9bc8a20d99938e647047015d62f6f86">More...</a><br /></td></tr>
<tr class="separator:ab9bc8a20d99938e647047015d62f6f86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d8ba4ae520a41add87512173a9289ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a5d8ba4ae520a41add87512173a9289ef">cordic_deg</a> (double deg, double *s, double *c)</td></tr>
<tr class="memdesc:a5d8ba4ae520a41add87512173a9289ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Sin and Cos from angle in degrees using Cordic.  <a href="#a5d8ba4ae520a41add87512173a9289ef">More...</a><br /></td></tr>
<tr class="separator:a5d8ba4ae520a41add87512173a9289ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5dff4f6a6c29502d824cc7574c13f1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#ab5dff4f6a6c29502d824cc7574c13f1c">cordic_rad</a> (double rad, double *s, double *c)</td></tr>
<tr class="memdesc:ab5dff4f6a6c29502d824cc7574c13f1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute Sin and Cos from angle in Rads using Cordic.  <a href="#ab5dff4f6a6c29502d824cc7574c13f1c">More...</a><br /></td></tr>
<tr class="separator:ab5dff4f6a6c29502d824cc7574c13f1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae708dfda7767e28c3faeedf2c46deafd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#ae708dfda7767e28c3faeedf2c46deafd">scale_point</a> (<a class="el" href="structpoint.html">point</a> *P, double scale)</td></tr>
<tr class="memdesc:ae708dfda7767e28c3faeedf2c46deafd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale x,y,z by scale factor.  <a href="#ae708dfda7767e28c3faeedf2c46deafd">More...</a><br /></td></tr>
<tr class="separator:ae708dfda7767e28c3faeedf2c46deafd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11f885e103030cb15b2f3477e21b780f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a11f885e103030cb15b2f3477e21b780f">shift_point</a> (<a class="el" href="structpoint.html">point</a> *P, <a class="el" href="structpoint.html">point</a> *shift)</td></tr>
<tr class="memdesc:a11f885e103030cb15b2f3477e21b780f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shift x,y,z by shift.  <a href="#a11f885e103030cb15b2f3477e21b780f">More...</a><br /></td></tr>
<tr class="separator:a11f885e103030cb15b2f3477e21b780f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11674104e89537aef6922d07f34e62ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a11674104e89537aef6922d07f34e62ae">rotate</a> (<a class="el" href="structpoint.html">point</a> *P, <a class="el" href="structpoint.html">point</a> *V)</td></tr>
<tr class="memdesc:a11674104e89537aef6922d07f34e62ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate point P by View point.  <a href="#a11674104e89537aef6922d07f34e62ae">More...</a><br /></td></tr>
<tr class="separator:a11674104e89537aef6922d07f34e62ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a793b036235e0fdd6e799866fcb14e7e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic_8h.html#a793b036235e0fdd6e799866fcb14e7e4">PerspectiveProjection</a> (<a class="el" href="structpoint.html">point</a> *P, double scale, int <a class="el" href="ili9341_8c.html#a12ad102c2d1e7e119fdc040b0c922c7e">x</a>, int <a class="el" href="ili9341_8c.html#afe490938209e0b6b15224c05a01f0b40">y</a>)</td></tr>
<tr class="separator:a793b036235e0fdd6e799866fcb14e7e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC against math library Add Documentation and references. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd>
<dd>
<a class="el" href="cordic_8h.html" title="Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC aga...">cordic.h</a>, we use fixed <a class="el" href="structpoint.html" title="Point definition. ">point</a> numbers, where 1.0=<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> Note: 1.0 = 90 degrees</dd></dl>
<dl class="section user"><dt>Copyright &copy; 2015 Mike Gore, GPL License</dt><dd></dd></dl>
<dl class="section user"><dt>You are free to use this code under the terms of GPL</dt><dd>please retain a copy of this notice in any code you use it in.</dd></dl>
<p>This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>

<p>Definition in file <a class="el" href="cordic_8h_source.html">cordic.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a132f4d86aeaa02138e534f93cbf69757"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double angle_quad </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>quads</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>quad</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute quadrant of angle and the quadrant modulus Note: Integer part is quadrant. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="cordic_8h.html" title="Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC aga...">cordic.h</a>, we use fixed <a class="el" href="structpoint.html" title="Point definition. ">point</a> numbers, where 1.0=<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> Note: 1.0 = 90 degrees </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">quads</td><td>1.0 = 90 degrees </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">quad</td><td>quadrant 0 = 0 .. 89.9999, 1 = 90 ... 179.999 ..., etc </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>fractional part of quads </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00071">71</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="cordic_8c_source.html#l00144">cordic_quad()</a>.</p>

</div>
</div>
<a class="anchor" id="a9e686d8e990a05ea18655a368e6d1918"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Circular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main Cordic routine - used for basic trig and vector rotations. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">x</td><td>Cordik_K, out: Cos of z </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">y</td><td>0, out: Sin of z </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">z</td><td>fixed point version of angle </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00103">103</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="cordic_8c_source.html#l00144">cordic_quad()</a>, and <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a5d8ba4ae520a41add87512173a9289ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void cordic_deg </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>deg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute Sin and Cos from angle in degrees using Cordic. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">deg</td><td>angle in degrees </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">*s</td><td>sin </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">*c</td><td>cos </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00215">215</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="cordic_8c_source.html#l00310">PerspectiveProjection()</a>, and <a class="el" href="cordic_8c_source.html#l00265">rotate()</a>.</p>

</div>
</div>
<a class="anchor" id="ab9bc8a20d99938e647047015d62f6f86"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void cordic_quad </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute Sin and Cos from angle in quads using Cordic. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>angle in quads ( 1 quad = 90 degrees) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*s</td><td>sin </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*c</td><td>cos </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00144">144</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="cordic_8c_source.html#l00215">cordic_deg()</a>, and <a class="el" href="cordic_8c_source.html#l00228">cordic_rad()</a>.</p>

</div>
</div>
<a class="anchor" id="ab5dff4f6a6c29502d824cc7574c13f1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void cordic_rad </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>rad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute Sin and Cos from angle in Rads using Cordic. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rad</td><td>angle in radians </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*s</td><td>sin </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*c</td><td>cos </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00228">228</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

</div>
</div>
<a class="anchor" id="a0de74b8b36857d95aadfc48438b64259"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> double deg2rad </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>deg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert Degrees to Rads. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">deg</td><td>degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>radians</dd></dl>
<p>Convert Degrees to Rads.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">deg</td><td>degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>radians </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00057">57</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="earth2wireframe_8c_source.html#l00077">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a793b036235e0fdd6e799866fcb14e7e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void PerspectiveProjection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00310">310</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="wire_8c_source.html#l00060">wire_draw()</a>.</p>

</div>
</div>
<a class="anchor" id="a11674104e89537aef6922d07f34e62ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void rotate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>V</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rotate point P by View point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*P</td><td>x,y,z point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*V</td><td>View point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00265">265</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

<p>Referenced by <a class="el" href="wire_8c_source.html#l00060">wire_draw()</a>.</p>

</div>
</div>
<a class="anchor" id="ae708dfda7767e28c3faeedf2c46deafd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void scale_point </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scale x,y,z by scale factor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*P</td><td>x,y,z point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>scale factor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00239">239</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

</div>
</div>
<a class="anchor" id="a11f885e103030cb15b2f3477e21b780f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void shift_point </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpoint.html">point</a> *&#160;</td>
          <td class="paramname"><em>shift</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Shift x,y,z by shift. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*P</td><td>x,y,z point </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>shift to apply to x,y,z </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic_8c_source.html#l00252">252</a> of file <a class="el" href="cordic_8c_source.html">cordic.c</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
